<%-- 
    Document   : listque
    Created on : Oct 26, 2012, 11:45:17 PM
    Author     : Swami
--%>

<%@page import="survey_dlt.controller.question"%>

<%@page import="java.util.ArrayList"%>
<%@page import="survey_dlt.dltquestion"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@include file="../../mastertemplate/header.jsp"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
      <%
        
        question s =new question();
      dltquestion ds=new dltquestion();
        ArrayList array = new ArrayList();  
        Object result = request.getAttribute("questionlist");  
//        out.println("hello");
        //String abc=request.getAttribute("event").toString();
        array = (ArrayList<dltquestion>) result;  
        //out.println(abc);
        out.println("<h1> Question List </h1> <table border=1>");
        for(int i=0;i<array.size();i++)
         {
            out.println("<tr>");
        ds=(dltquestion)array.get(i);
        out.println("<Td>" +ds.getSd_id());  
       
        out.println("<Td>" +ds.getSid());  
        out.println("<Td>" + ds.getQid());
         out.println("<Td>" +ds.getQue());  
       out.println("<input type='hidden'  value='"+ds.getSid()+"' name='srid'>");
        out.println("<Td><a href='question?delque="+ds.getSd_id()+"')><input type='button' value='Delete' id='"+ds.getSd_id()+"'/></a></Td>");
        //out.println("<a href='../qrydlt'><td><input type='button' value='Delete' name='"+ds.getSid()+"' id='"+ds.getSid()+"'></td></a>");
                   
        out.println("<tr>");
         }
        out.println("<table>");
       out.println("<Td><a href='survey?d="+1+"'><input type='button' value='Surveylist'/></a></Td>");
 
        %>
            
        <%@include file="../../mastertemplate/footer.jsp."%>
    </body>
</html>
